package threadlocal;

/**
 * Created by chinalin on 2017/3/22.
 */
public class SequenceA implements Sequence {
    private static int number = 0 ;
    @Override
    public int getNumber() {
        number = number + 1 ;
        return number ;
    }

    public static void main(String[] args) {
        Sequence sequence = new SequenceA() ;
        CliecntThread thread1 = new CliecntThread(sequence) ;
        CliecntThread thread2 = new CliecntThread(sequence) ;
        CliecntThread thread3 = new CliecntThread(sequence) ;

        thread1.start();
        thread2.start();
        thread3.start();
    }

}
